created a second publish function to handle the independent publishing
of x and y