implemented on-off mechanism