code for behavioral experiments