Debuged Version