final implementation of the v1