Some optimazion on calc times