calculating fees