add comments and more stub functions