New Door code

added an api aswell