added missing block | removed redundant code in model