added option to select access specifier, improved output format