added input and structure for movement