refactored boto for python3