removed atexit magic and added convert