solve function left