updated interface to return float