comments added for connection overlay code duplication