final version debug