updated some methods to make them more efficient
finished implementing the entire encryption process