added conversion code