improved calculator fragmetn