working version
updated