added constraint function

not yet implemented in visual