adding miguel's changes