move extra can close code to its own class