completed app.py functionality with sqs