worked on core logic