added code as requirable module for api usage