fix rotate position & add hm code