Changed to form partial, simplified code