the implemenation of virtibi that i had come up with earlier