hacky javascript