set functions for pins for NS