first fully functional version of planning screen. refactoring needed