added custom speed functionality