added method to change pending