cleaned up to conform to idiomatic guidelines