Refactored in case browsers dont like js