use css transform if possible
refactor