added weights and fixed a bug
Merge branch 'master' of github.com:edwindj/cspa_rest