debugging and fixing