Implemented first solver