Moving code to parent