fixed the bug by initializing two variables