updated with source comments