check some errors and more docs