main without plotting