cleaded up analytical solutions