Quick solutions for first two functional cases