minor organization & optimization