fixed a bug and added debug-option
updated readme