bug fixes, more functoins...