added a spec for using val definitions within val definitions when defining factors