adding brake functionality