finished refactoring PileController :)