Scribbled possible solution for handling threshold for two directions