made edits acc to Matt's input