install docco
fix syntax
fix cos calculation