url functionality & DB stuff finally works