Implemented saving data through shared preferences