remake for using xib.