Changing some aspects so in this form Iwpould be using more ruby language STILL NEEDS REFACTOR