change layout to gridlayout
remove deprecated functions