WIP for off button and distnace calculation