move logic in methods