add standard error reporting
reverse order of xrandr calls
totally refactor