added setand check function