finsished up code, now for testing