tidy up this icky conversion