added number_of_instances and passed rpsec