added check boxes and changed some vaiables