put include at beggining of file and moved isowner statements into one php block