well, at least abstract it to method here. It is really long method now