simplified code of derived measures