add function to use for local control