Further updates: broken implementation to submit for lab, need to reimplement with all calculation in main activity