added unit price cal function