Added execution and fixed if stmt