reformated js code, so it's better readable