Updated main to accept 3 endpoints