Added logic with specs