Updated to work with gen2 and lightning