organized javascript much better