coding standards
move stuff out from cluttering the main
ternary operator is evil!