write necessary code
fix mess