added some changes to the function for single line statements. found bug in printing. going to fix