write extension into database