shortened main function a bit
Revert "shortened main function a bit"