added increased functionality. movement error checking