further simplified boxing/unboxing code