Started rewriting the conditions to be more generic