added a analytic part. will be moved to another place