finally un-harcoded locahost, once and for all