updated
cleaned up main a bit