re-writing everything using angular