each post now belongs to a lecture, user can add and choose a lecture
tidied up code