closed #507
closed #589