Try to write more idiomatic code.