solves for euler