update with a few modifications from in class and outside of class with additional annotations