simplified and renamed