going couchapp
reworking for portability