made main method less ugly