started with checking type of statements