improve loadBy, implement getBy