homework5 and fixed others bug