added wait
added time. more tests and samples
readme and comments changed
interface changes, utility functions
formatted