copied over from hw repository