Change parent() function into parentX() function