no longer required
improved logic,restructured,indentation