Fleshed out backend function