changed some code to boxed notation