my logic outlined in the file