now works also for variable with height dim