pr for #77 (for review)

This pr is now updated.