replace completely wrong appreach with better approach