Added -main function