made layout happen when required