modified source code to match go conventions