fixed require and added exposed api