method made async

changed code to agreed conventions, such as if(arguments.length)
cleanup