extracted common behaviour to method