function for moment based off of init conditions