method constraing