still not working as element position is not updated after animation