2nd Function working. Would use Regex for cleaner more robust code