Backend code for Sfoipy