cleanup

shortened if/else statement
cleanup

shortened block
changed to regex

don’t know why I didn’t do this earlier