checkbox functionality + failing comparison