removed unnecessary elements, fixed statements