layout and resolving conflicts