changed height type to int (from unsigned) to work better in templates