updated working meter code