flipping older newer to right sides
moving secret key to env config