finished basic backend