#51 improve controller code for slider