added asserts
Added more information for functions