Implementation of velocity.py