modified main for testing