Created code for velocity conversion