refactor for a javaee environment. it cant handle as much