main functionality implemented, still need a sane solution for comparing URLs in test