added final bits of code from css template