fixed conditions more, but still needs work