test gates functional