improving maftop.vhd