Added advanced solution