worked on debuging