replaced bool with boolean (deprecated in typescript 0.9.1)