I changed key names and added previous page logic