added inline documentation