fix formatting and use idiomatic names