implemented overdraw and layout bounds