struggling to figure out proper architecture