added sortby parameter to bean method