refactor + css transition