Pass value to px and py instead of p