added range adjustment
all required features working