public method for setting px agent