updated source and documentation