might rewrite the conversion logic again..