Finished and working program!