refactor caesar cipher