removing class structure .. going back to procedural .. speed issues .. will worry later