Updated and simplified