added a cleaner implementation of a slider