entering message
refactor a bit