add option to open haddock documents
rename some functions for syntax