swap public/private blocks
added options parser