incorportated Adam's changes