handle shift and delete