fixed creation issues

need to implement main context