getting my logic working