updated to use CDI