Please write spec covering this method, it's big, and the spec is must have for it to cover all possible cases...