I added size function and made small edits for clarity