reviewing peoples code, removing castles serialize function (not needed)