basic version
works for naive cases