corrected some indentation and added doc strings