code improvements, fix #25