Change to @Wouterj proposal which is better