Implemented if statement