Updating based on great suggestion by som-snytt