some include fixes and implemented brakeing