finished code, running smoothly