move relational programming code