added adaptive layout