need to optimise 40