debug fixed implemented