Make it simpler, add comments