merged basics with old code