missing var declaration
refactoring to use js-library