slow but working assignment 6