working to restructure logic to match our design