implemented proper box displaying