fix naming and condition