refactoring + add linear transitions