added better wrange functionality
