Started work on getting the logic to work