working on logic to tie both together