better javascript, still pittyfully looking