updating code.. needs review at this point