removed redundant join; fixed indentation