Update handlers.py

a little bit cleaner