working on inside logics handling etc