added conversion methods (without corner cases done).