refactored wallet into its own class