removed shape
adding conversion methods
moving functions to a more relevant place