Replaced code with in class code as demo