get the basic funcationing working. few thing yet to be optimized and working ...