implemented if, while