add end and home actions and repeat