refacter layout