updated functions for UI and movement