improved formatting and added comments
better way to checkand download required packages