repaired modal for creating layout