organized program a bit more