my version of convertTo