completely refactored the entire app stem to sterm because of some bugs