modified to adjust size automatically
Merge branch 'master' into hp_nao
debugged