writing screen rotation part.