updated interface and logic