Re-coded a little bit more