adding calculation fields to view and db