working on test mode