seperating operations to find the bug