this is class project. pain in ass