updated to use new entities