Extract similar code to one function