major improvements in source code