Added serialisation using pickle