added conversion and cleaned up