changed to a dynamic layout