worked on the suggestions in the comments