started adding rest of logic