Could be integrated with the previous if condition