added flask support and local testing