implemented command handler