main and setup