fix transitions and add better ratio checker