add mail function and remove .pyc files