working version of project. still needs polishing and comments