modified and enhanced
enhanced public api