refactor with compressed type signatures