fix movement func