upgraded to return java object from handler methods