updating main for real use