working 1st part,need to clean code