added function that checks whether current position is already being guarded