cleaning up slider box code a bit