added inArray function, cleaned up movement