just added the old lok based version of the code