re-wrote feature.js module