refactored, added API entities