small changes for 4,5,7
solution for 8