added initial cell frame calculation