to be put efficiently in one method