This is for my SE class, so don't rate the code :)