refactore main process and make extra methods in calcs