added logic for author