Start of implementation using javascript to do the work