[sw] refactoring to get calculation function from remotely