a few changes and additions

some functions was added.