Trying to write subroutine for Comparison. Issues with returning string