refactory on multiple locations