added a common functionality