moved stuff around and then added encryption