made JS work with sample data