get height only once