add open courses function, design new table