fixed indentation issue
removed extra gets method and used constant for regex
added chomp method