still trying to fix the bug