Updated slaphandler with right random upper bound and added more actions