now using apiDeffinition object instead of flat strings
fixing typo