implemented methods to check if action can be performed