added debuger and fixed issue had with sample