fix a lot of problems and add notification
add a lot of functions