modified to accommodate locations